package com.ruoyi.function.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.function.mapper.RoadInterchangeMapper;
import com.ruoyi.function.domain.RoadInterchange;
import com.ruoyi.function.service.IRoadInterchangeService;

/**
 * 枢纽互通里程实测数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class RoadInterchangeServiceImpl implements IRoadInterchangeService 
{
    @Autowired
    private RoadInterchangeMapper roadInterchangeMapper;

    /**
     * 查询枢纽互通里程实测数据
     * 
     * @param id 枢纽互通里程实测数据主键
     * @return 枢纽互通里程实测数据
     */
    @Override
    public RoadInterchange selectRoadInterchangeById(Long id)
    {
        return roadInterchangeMapper.selectRoadInterchangeById(id);
    }

    /**
     * 查询枢纽互通里程实测数据列表
     * 
     * @param roadInterchange 枢纽互通里程实测数据
     * @return 枢纽互通里程实测数据
     */
    @Override
    public List<RoadInterchange> selectRoadInterchangeList(RoadInterchange roadInterchange)
    {
        return roadInterchangeMapper.selectRoadInterchangeList(roadInterchange);
    }

    /**
     * 新增枢纽互通里程实测数据
     * 
     * @param roadInterchange 枢纽互通里程实测数据
     * @return 结果
     */
    @Override
    public int insertRoadInterchange(RoadInterchange roadInterchange)
    {
        return roadInterchangeMapper.insertRoadInterchange(roadInterchange);
    }

    /**
     * 修改枢纽互通里程实测数据
     * 
     * @param roadInterchange 枢纽互通里程实测数据
     * @return 结果
     */
    @Override
    public int updateRoadInterchange(RoadInterchange roadInterchange)
    {
        return roadInterchangeMapper.updateRoadInterchange(roadInterchange);
    }

    /**
     * 批量删除枢纽互通里程实测数据
     * 
     * @param ids 需要删除的枢纽互通里程实测数据主键
     * @return 结果
     */
    @Override
    public int deleteRoadInterchangeByIds(Long[] ids)
    {
        return roadInterchangeMapper.deleteRoadInterchangeByIds(ids);
    }

    @Override
    public List<RoadInterchange> selectRoadInterchangeListForExport(RoadInterchange roadInterchange)
    {
        return roadInterchangeMapper.selectRoadInterchangeListForExport(roadInterchange);
    }

    /**
     * 删除枢纽互通里程实测数据信息
     * 
     * @param id 枢纽互通里程实测数据主键
     * @return 结果
     */
    @Override
    public int deleteRoadInterchangeById(Long id)
    {
        return roadInterchangeMapper.deleteRoadInterchangeById(id);
    }

    /**
     * 是否存在子节点
     * 
     * @param id 节点ID
     * @return 结果 true 存在 false 不存在
     */
    @Override
    public boolean hasChildById(Long id)
    {
        int result = roadInterchangeMapper.hasChildById(id);
        return result > 0;
    }
}
